package com.easyapi.dao.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easyapi.common.vo.user.PermissionVo;
import com.easyapi.dao.entity.user.ApiCenterRolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ApiCenterRolePermissionMapper extends BaseMapper<ApiCenterRolePermission> {
    List<PermissionVo> getPermissionsByRoleIds(@Param("roleIds")List<Long> roleIds);
    void deleteByRoleId(@Param("roleId")Long roleId);
    void deleteByRoleIdAndPermissionId(@Param("roleId")Long roleId, @Param("permissionId")Long permissionId);
    ApiCenterRolePermission getByRoleIdAndPermissionId(@Param("roleId")Long roleId, @Param("permissionId")Long permissionId);
}